/**
 * 使用Runnable创建线程并命名
 */
public class ThreadDemo11 {
    public static void main(String[] args) {
        Thread thread=new Thread(new Runnable(){
            @Override
            public void run(){
                try {
                    Thread.sleep(60*60*100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"Runnable-Thread");
        //启动线程
        thread.start();
    }
}
